#pragma once
#include "widget.h"

class CRelationWidget :
	public CWidget
{
public:
	CRelationWidget(void);
	~CRelationWidget(void);
public:
	CWidget* m_pSrcWidget;
	CWidget* m_pTargetWidget;
	WPoint	ptSrcOld;
	WPoint ptTargetOld;
	bool m_bAutoHook;
	int GetConnectPoint(int x_src, int y_src, int x_tar, int y_tar);
	virtual int HandleEvent(int evCode, int param1, int param2);
	virtual int Draw(CCanvas* pCanvas, int screen_x, int screen_y);
	virtual CWidget* FindWidgetByPoint(WPoint* pt);
};
